package com.atguigu.gulimall.product.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.product.feign.fallback.SeckillFallbackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author 胡忠智
 * @date 2022/1/3-16:45
 * @Description TODO
 */
@FeignClient(value = "jiajialemall-seckill",
             fallback = SeckillFallbackService.class) // 被限流后的处理类
public interface SecKillFeignService {

    @GetMapping(value = "/getSeckillSkuInfo/{skuId}")
    R getSeckillSkuInfo(@PathVariable("skuId") Long skuId);
}
